import React, { useState } from 'react';
import CommentFilter from './CommentFilter';
import CommentInput from './CommentInput';
import CommentList from './CommentList';
import {COMMENTS} from "./data";

const CommentApp = () => {
  const [comments,setComments] = useState(COMMENTS)
  const [activeType,setActiveType] = useState(initialState="All")
  return (
    <div>
      <CommentInput comments={comments} setComments={setComments}/>
      <CommentList comments={comments} activeType= {activeType}/>
      <CommentFilter setActiveType={setActiveType}/>
    </div>
  );
};

export default CommentApp;

